package org.gitos.cloud.server.rpc;

import java.util.HashMap;

import org.gitos.cloud.domain.rpc.LogicRPC;
import org.gitos.cloud.server.service.RelationService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.dubbo.config.annotation.Service;

/**
 * Created by shizhengchu on 16/1/18.
 */
@Service(timeout = 5000)
public class LogicRPCImp  extends CommonMethod implements LogicRPC {

    private static Logger log = LoggerFactory.getLogger(LogicRPCImp.class);

    @Autowired
    private RelationService relationService;

     @Override
    public HashMap<String, Object> bindInuser(String user_uuid,String mobile_os,String inuser_token) {
        return judge(relationService.bindInuser(user_uuid,mobile_os,inuser_token));
    }

    @Override
    public HashMap<String, Object> leds(String user_uuid) {
        return success(relationService.leds(user_uuid));
    }

    @Override
    public HashMap<String, Object> bindLed(String user_uuid, String mac) {
        return judge(relationService.bindLed(user_uuid,mac));
    }

    @Override
    public HashMap<String, Object> roms(String mac, String version, int type) {
        return success(relationService.roms(mac,version,type));
    }


}
